<layout name="Layout/PetHead"/>
<style>
    body{
        background:
    }
    #clear{
        height:50px
    }
    dl{clear:left;border:1px solid black;padding: 10px;}
    dt{float:left;width:150px;text-align: center;}
    #publish{
        font-size: 15px;
        font-style: normal;
        color: black;
    }
    .submit{
        margin-left: 415px;
        background-color: #5bb75b;
        border: 0 none;
        color: #fff;
        cursor: pointer;
        display: block;
        font-size: 18px;
        font-weight: bold;
        width:75px;
        height: 15px;
        padding: 4px 20px 31px;
        text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.1);

    }
    .submit:hover{
        background-color: #51a351;
        color:#fff;
        text-decoration: none;
    }
</style>
<div id="publish" style="margin-top: 50px;">
    <span style="margin-left:45%;font-size: 34px; font-family: '楷体' ;color: orange;">医资认证</span>
    <div id="clear"></div>
    <?php if(!empty($doctor) && is_array($doctor)){?>
        <dl>
            <dt>审核状态：</dt>
            <dd><?php if($doctor['ifpass'] == 1){?><font color="green">已认证</font><?php }elseif($doctor['ifpass'] == 2){?><font color="red">认证失败</font><?php }else{ ?><font color="blue">正在认证</font><?php } ?></dd>
        </dl>
        <dl>
            <dt>真实姓名：</dt>
            <dd><?php echo $doctor['name']?></dd>
        </dl>
        <dl>
            <dt>个人证件照：</dt>
            <dd><img src="__PUBLIC__/img/Pet/<?php echo $doctor['photo']?>" width="100px" height="100px"/></dd>
        </dl>
        <dl>
            <dt>兽医资格证：</dt>
            <dd><img src="__PUBLIC__/img/Pet/<?php echo $doctor['qualficate_photo']?>" width="100px" height="100px"/></dd>
        </dl>
    <?php }else{?>
    <form id="cer_form" method="post" action="__APP__/home/pet/doctor_cer" enctype="multipart/form-data">
        <input name="submit" value="OK" type="hidden"/>
        <dl>
            <dt>
                真实姓名
            </dt>
            <dd>
                <input name="name" type="text"/>
            </dd>
        </dl>
        <dl>
            <dt>
                个人身份证照片
            </dt>
            <dd>
                <p></p>
                <input type="file" name="photo" style="margin-left:150px"/>
            </dd>
        </dl>
        <dl>
            <dt>兽医资格证照片</dt>
            <dd>
                <p></p>
                <input type="file" name="qualficate_photo" style="margin-left:150px"/></dd>
        </dl>
        <dl style="text-align: center">
            <input type="submit" class="submit" value="提交"/>
        </dl>
    </form>
    <?php } ?>
</div>
<script>
    $(function(){
        $("input[name='photo']").change(function(){
            var src = getFullPath($(this)[0]);
            $(this).prev('p').html('<img src="'+src+'" style="width:100px;height:100px;">');
        });
        $("input[name='qualficate_photo']").change(function(){
            var src = getFullPath($(this)[0]);
            $(this).prev('p').html('<img src="'+src+'"style="width:100px;height:100px;">');
        });

        $(".sf-menu>li:eq(2)").addClass("current");
        $(".sf-menu>li:eq(1)").removeClass("current");

    });
</script>
